package com.zhang.yygh.hosp;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@SpringBootApplication
@MapperScan(value = "com.zhang.yygh.hosp.mapper")
//虽然@SpringBootApplication注解依赖的有@ComponentScan注解，但是它只能扫描当前配置类所在包及其子包下的内容
//而自己所写的@ComponentScan注解可以扫描整个项目下的内容
@ComponentScan(value = "com.zhang")
@EnableDiscoveryClient //开启nacos客户端支持
@EnableFeignClients(basePackages = "com.zhang")
public class ServiceHospApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceHospApplication.class, args);
    }
}